package router

import (
	"example.com/m/demo14/controller"
	"github.com/gin-gonic/gin"
)

func RouterInits(r *gin.Engine) {
	userRouters := r.Group("/user")
	{
		userRouters.GET("/getUser", controller.UserController{}.GetUser)
		userRouters.GET("/updateUser", controller.UserController{}.UpdateUser)
		userRouters.GET("/createUser", controller.UserController{}.CreateUser)
		userRouters.GET("/deleteUser", controller.UserController{}.DeleteUser)
	}
	articleRouters := r.Group("/article")
	{
		articleRouters.GET("/create", controller.ArticleController{}.CreateArticle)
		articleRouters.GET("/get", controller.ArticleController{}.GetArticle)
		articleRouters.GET("/update", controller.ArticleController{}.UpdateArticle)
		articleRouters.GET("/delete", controller.ArticleController{}.DeleteArticle)
	}
	studentRouters := r.Group("/student")
	{
		studentRouters.GET("/create", controller.StudentController{}.CreateStudent)
		studentRouters.GET("/get", controller.StudentController{}.GetStudent)
	}
}
